package cn.tannn.tcache.command;

import cn.tannn.tcache.core.Command;
import cn.tannn.tcache.core.Commands;
import cn.tannn.tcache.core.Reply;
import cn.tannn.tcache.core.Tcache;

/**
 * support command list
 * <p> command
 *
 * @author <a href="https://t.tannn.cn/">tnnn</a>
 * @version V1.0
 * @date 2024/6/19 下午9:46
 */
public class CommandCommand implements Command {
    @Override
    public String name() {
        return "COMMAND";
    }

    @Override
    public Reply<?> exec(Tcache cache, String[] args) {
        return Reply.array(Commands.getCommandNames());
    }
}
